// const father = {
//   as: 2,
//   bb: 3
// }
//
// for (const i in father) {
//   if (i === 'as') {
//     father[i] = 4
//   }
// }
// console.log(father.size)
const mongoose = require('mongoose')
const { url } = require('./config/database')

const partner = require('./model/partner')
// const answer = partner.cold.findOne({username: 'heathen' })

mongoose.connect(url, { useUnifiedTopology: true }).then(
  () => {
    partner.cold.find({ username: 'pp' }, ['partner'], function (err, doc) {
      if (err === null) {
        console.log(doc)
      }
    })
  }
)
